Installing Jinzora on Ubuntu
From Brandonhutchinson.com
(Difference between revisions)
| (20 intermediate revisions not shown.) | |||
| Line 1: | Line 1: | ||
| - | + | The following are step-by-step instructions for installing an Jinzora 2.75 on a Ubuntu 7.04 (Feisty) system. Jinzora will be accessed via HTTPS. Please visit the [[#Links]] to read more about the installation before proceeding. | |
| - | + | == Install Jinzora == | |
| - | + | ||
| - | + | ||
| + | * Install prerequisites. | ||
| + | $ '''sudo aptitude -y install apache2 libapache-mod-ssl php5 mysql-server php5-mysql php5-gd''' | ||
| - | $ | + | * Download Jinzora. |
| + | $ '''wget http://www.jinzora.com/downloads/jz275.tar.gz''' | ||
| + | * Install Jinzora. | ||
| + | $ '''sudo tar zxvf jz275.tar.gz -C /var/www/''' | ||
| + | $ '''( cd /var/www/jinzora2 && sudo sh configure.sh )''' | ||
| - | $ sudo rm -r /var/www/jinzora2/install | + | == Configure Jinzora == |
| + | |||
| + | * Change PHP5 settings for Jinzora. | ||
| + | $ '''sudo perl -pi.bak -e 's/max_execution_time = \d+/max_execution_time = 300/;s/post_max_size = \d+M/post_max_size = 32M/;s/upload_max_filesize = \dM/upload_max_filesize = 32M/' /etc/php5/apache2/php.ini''' | ||
| + | |||
| + | * Set the root password for MySQL. By default, it is blank. | ||
| + | $ '''mysql -u root mysql''' | ||
| + | Reading table information for completion of table and column names | ||
| + | You can turn off this feature to get a quicker startup with -A | ||
| + | |||
| + | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
| + | Your MySQL connection id is 14 | ||
| + | Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution | ||
| + | |||
| + | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | ||
| + | |||
| + | mysql> '''SET PASSWORD FOR root@localhost=PASSWORD('''password''');''' | ||
| + | Query OK, 0 rows affected (0.00 sec) | ||
| + | |||
| + | mysql> '''\q''' | ||
| + | Bye | ||
| + | |||
| + | * Reload Apache to ensure required and optional modules are found. | ||
| + | $ '''sudo /etc/init.d/apache2 reload''' | ||
| + | |||
| + | * Configure Jinzora by opening a Web browser to http://localhost/jinzora2. Some non-obvious settings: | ||
| + | ** Installation Type: '''Standalone''' | ||
| + | ** Jukebox Mode: '''Streaming Only''' | ||
| + | ** Database User: '''root''' | ||
| + | ** Database Password: ''root@localhost password above'' | ||
| + | ** Database Type: '''MySQL''' | ||
| + | ** Create Database: '''True''' | ||
| + | |||
| + | * Before launching Jinzora, remove the installation directory. | ||
| + | $ '''sudo rm -r /var/www/jinzora2/install''' | ||
| + | |||
| + | == Create an Apache HTTPS instance == | ||
| + | |||
| + | * Create a private key for the Apache server. | ||
| + | $ '''openssl genrsa -des3 -out server.key 1024''' | ||
| + | |||
| + | * Create a Certificate Signing Request (CSR). Make sure the Common Name is equal to fully-qualified domain name of your Web server (i.e., if you will access your Web server at https://host.example.com, the Common Name should be host.example.com). | ||
| + | $ '''openssl req -new -key server.key -out server.csr''' | ||
| + | |||
| + | * Create a self-signed server certificate by using the private key to sign the CSR. | ||
| + | $ '''openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt''' | ||
| + | |||
| + | If you receive an '''unable to write 'random state'''' error, change permissions on ''~/.rnd'' so that it is writable by the user running the command. | ||
| + | |||
| + | * Remove the private key passphrase (i.e., create an unencrypted PEM version of the private key) so that Apache can start without user interaction. | ||
| + | $ '''openssl rsa -in server.key -out server.pem''' | ||
| + | $ '''rm server.key''' | ||
| + | |||
| + | * Move the Apache certificate and private key to the Apache directory and configure permissions. | ||
| + | $ '''sudo mv server.pem /etc/apache2/apache.pem''' | ||
| + | $ '''sudo mv server.crt /etc/apache2/apache.crt''' | ||
| + | $ '''sudo chown root:root /etc/apache2/apache.pem''' | ||
| + | $ '''sudo chmod 400 /etc/apache2/apache.pem''' | ||
| + | |||
| + | * Enable mod_ssl within Apache. | ||
| + | $ '''sudo a2enmod ssl''' | ||
| + | |||
| + | * Configure Apache to listen on port 443 (HTTPS). | ||
| + | $ '''sudo sh -c 'echo "Listen 443" >> /etc/apache2/ports.conf'''' | ||
| + | |||
| + | * Create an HTTPS site. | ||
| + | $ '''sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl''' | ||
| + | |||
| + | * Modify ''/etc/apache2/sites-available/ssl''. | ||
| + | Before: | ||
| + | |||
| + | NameVirtualHost * | ||
| + | <VirtualHost *> | ||
| + | ServerAdmin webmaster@localhost | ||
| + | |||
| + | After: | ||
| + | |||
| + | NameVirtualHost *''':443''' | ||
| + | <VirtualHost *''':443'''> | ||
| + | ServerAdmin webmaster@localhost | ||
| + | |||
| + | '''SSLEngine On''' | ||
| + | '''SSLCertificateFile /etc/apache2/apache.crt''' | ||
| + | '''SSLCertificateKeyFile /etc/apache2/apache.pem''' | ||
| + | |||
| + | * Enable the HTTPS site. | ||
| + | $ '''sudo a2ensite ssl''' | ||
| + | |||
| + | * Reload Apache for the changes to take effect. | ||
| + | $ '''sudo /etc/init.d/apache2 reload''' | ||
| + | |||
| + | == Links == | ||
* [http://www.linode.com/wiki/index.php/Apache2_SSL_in_Ubuntu Apache2 SSL in Ubuntu] | * [http://www.linode.com/wiki/index.php/Apache2_SSL_in_Ubuntu Apache2 SSL in Ubuntu] | ||
Current revision
The following are step-by-step instructions for installing an Jinzora 2.75 on a Ubuntu 7.04 (Feisty) system. Jinzora will be accessed via HTTPS. Please visit the #Links to read more about the installation before proceeding.
Contents |
Install Jinzora
- Install prerequisites.
$ sudo aptitude -y install apache2 libapache-mod-ssl php5 mysql-server php5-mysql php5-gd
- Download Jinzora.
$ wget http://www.jinzora.com/downloads/jz275.tar.gz
- Install Jinzora.
$ sudo tar zxvf jz275.tar.gz -C /var/www/ $ ( cd /var/www/jinzora2 && sudo sh configure.sh )
Configure Jinzora
- Change PHP5 settings for Jinzora.
$ sudo perl -pi.bak -e 's/max_execution_time = \d+/max_execution_time = 300/;s/post_max_size = \d+M/post_max_size = 32M/;s/upload_max_filesize = \dM/upload_max_filesize = 32M/' /etc/php5/apache2/php.ini
- Set the root password for MySQL. By default, it is blank.
$ mysql -u root mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SET PASSWORD FOR root@localhost=PASSWORD(password); Query OK, 0 rows affected (0.00 sec) mysql> \q Bye
- Reload Apache to ensure required and optional modules are found.
$ sudo /etc/init.d/apache2 reload
- Configure Jinzora by opening a Web browser to http://localhost/jinzora2. Some non-obvious settings:
- Installation Type: Standalone
- Jukebox Mode: Streaming Only
- Database User: root
- Database Password: root@localhost password above
- Database Type: MySQL
- Create Database: True
- Before launching Jinzora, remove the installation directory.
$ sudo rm -r /var/www/jinzora2/install
Create an Apache HTTPS instance
- Create a private key for the Apache server.
$ openssl genrsa -des3 -out server.key 1024
- Create a Certificate Signing Request (CSR). Make sure the Common Name is equal to fully-qualified domain name of your Web server (i.e., if you will access your Web server at https://host.example.com, the Common Name should be host.example.com).
$ openssl req -new -key server.key -out server.csr
- Create a self-signed server certificate by using the private key to sign the CSR.
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
If you receive an unable to write 'random state' error, change permissions on ~/.rnd so that it is writable by the user running the command.
- Remove the private key passphrase (i.e., create an unencrypted PEM version of the private key) so that Apache can start without user interaction.
$ openssl rsa -in server.key -out server.pem $ rm server.key
- Move the Apache certificate and private key to the Apache directory and configure permissions.
$ sudo mv server.pem /etc/apache2/apache.pem $ sudo mv server.crt /etc/apache2/apache.crt $ sudo chown root:root /etc/apache2/apache.pem $ sudo chmod 400 /etc/apache2/apache.pem
- Enable mod_ssl within Apache.
$ sudo a2enmod ssl
- Configure Apache to listen on port 443 (HTTPS).
$ sudo sh -c 'echo "Listen 443" >> /etc/apache2/ports.conf'
- Create an HTTPS site.
$ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
- Modify /etc/apache2/sites-available/ssl.
Before:
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
After:
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@localhost
SSLEngine On
SSLCertificateFile /etc/apache2/apache.crt
SSLCertificateKeyFile /etc/apache2/apache.pem
- Enable the HTTPS site.
$ sudo a2ensite ssl
- Reload Apache for the changes to take effect.
$ sudo /etc/init.d/apache2 reload
