|
Personal Development OurmediaThis guide will take you all the way through the instalation of Apache, MySQL, PHP, and CVS for the creation of a personal development portal built on CVS Drupal Most users will probably be satisfied just with a LAMP system, so just quit reading when you get there :) = System Repository Expansion = From the first SSH into a fresh Ubuntu 6.06 install (as root user!). <pre>$ cp /etc/apt/sources.list /etc/apt/sources.list.original you'll be in vi on the line <pre>deb http://archive.ubuntulinux.org/ubuntu dapper main</pre> Type two 'd's (that's 'dd'). That will delete the only line in the file. Type 'i' to enter insert mode. Copy the following text, and paste (shift-ctrl-v) it into the terminal so you'll be using a standard server configuration with the universe, multiverse, and restricted repositories activated. <pre>## Add comments (##) in front of any line to remove it from being checked.
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
Type esc to exit insert mode. Type ':wq' to write the file and quit. Locales are improperly setup so run: <pre>$ locale-gen en_US
Update and upgrade your server. <pre>$ apt-get update The repository indexes will be downloaded, and if you're asked if you want to install packages just hit enter or type 'y' and hit enter. Your system is now up to date (and slightly less secure, but hey, security's just a practice). = LAMP Installation = Install the SoftwarePaste this into your terminal as one line. You may not want phpMyAdmin, and you certainly don't need it, but isn't it handy. <pre>apt-get install mysql-server mysql-admin apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql phpmyadmin</pre> Type enter or 'y' and enter. Setup MySQLOnly allow connections from localhost, especially for the root user. <pre>$ mysqladmin -u root password your-new-password Restart Apache <pre>/etc/init.d/apache2 restart</pre> Check the InstallationMake a php file to test the server: <pre>$ vi /var/www/testphp.php</pre> Type 'i' to enter insert mode and then paste (shift-ctrl-v) the folowing text. <pre><div class="codeblock"> Type esc and then ':wq' to save the file. Go to http://example.com/ You should see <pre>Index of / Icon Name Last modified Size Description[DIR] apache2-default/ 26-Jul-2006 17:50 - Apache/2.0.55 (Ubuntu) PHP/5.1.2 Server at example.com Port 80</pre> Go to testphp.php . You should see a whole slew of information about your PHP settings. Go to http://example.com/phpmyadmin/ Log into phpMyAdmin as the root user! If everything is working...it's working. = Installing Drupal = Installing CVSapt-get install subversion cvs Installing from Drupal CVSCheckout the Sources<pre>$ cd /var/www/ I'm migrating my personal portal so I'm also going to be checking out some modules. <pre>$ cd /var/www/drupal/modules Repeat that command as needed. Install a theme other than one of the default themes. <pre>$ cd /var/www/drupal/themes
Setup the Drupal DatabaseRemember back in the day when you set the root password for your MySQL server, you're going to need that password right now to create another MySQL user. <pre> First, you must create a new database for your Drupal site mysqladmin -u root -p create databasename MySQL will prompt for the 'dba_user' database password and then create mysql -u root -p Again, you will be asked for the 'dba_user' database password. GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, where 'databasename' is the name of your database Note: Unless your database user has all of the privileges listed If successful, MySQL will reply with: Query OK, 0 rows affected To activate the new permissions, enter the following command: FLUSH PRIVILEGES;</pre> <cite>Drupal CVS: INSTALL.mysql.txt</cite> This guide will take you all the way through the instalation of Apache, MySQL, PHP, and CVS for the creation of a personal development portal built on CVS Drupal Most users will probably be satisfied just with a LAMP system, so just quit reading when you get there :) = System Repository Expansion = From the first SSH into a fresh Ubuntu 6.06 install (as root user!). <pre>$ cp /etc/apt/sources.list /etc/apt/sources.list.original you'll be in vi on the line <pre>deb http://archive.ubuntulinux.org/ubuntu dapper main</pre> Type two 'd's (that's 'dd'). That will delete the only line in the file. Type 'i' to enter insert mode. Copy the following text, and paste (shift-ctrl-v) it into the terminal so you'll be using a standard server configuration with the universe, multiverse, and restricted repositories activated. <pre>## Add comments (##) in front of any line to remove it from being checked.
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
Type esc to exit insert mode. Type ':wq' to write the file and quit. Locales are improperly setup so run: <pre>$ locale-gen en_US
Update and upgrade your server. <pre>$ apt-get update The repository indexes will be downloaded, and if you're asked if you want to install packages just hit enter or type 'y' and hit enter. Your system is now up to date (and slightly less secure, but hey, security's just a practice). = LAMP Installation = Install the SoftwarePaste this into your terminal as one line. You may not want phpMyAdmin, and you certainly don't need it, but isn't it handy. <pre>apt-get install mysql-server mysql-admin apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql phpmyadmin</pre> Type enter or 'y' and enter. Setup MySQLOnly allow connections from localhost, especially for the root user. <pre>$ mysqladmin -u root password your-new-password Restart Apache <pre>/etc/init.d/apache2 restart</pre> Check the InstallationMake a php file to test the server: <pre>$ vi /var/www/testphp.php</pre> Type 'i' to enter insert mode and then paste (shift-ctrl-v) the folowing text. <pre><div class="codeblock"> Type esc and then ':wq' to save the file. Go to http://example.com/ You should see <pre>Index of / Icon Name Last modified Size Description[DIR] apache2-default/ 26-Jul-2006 17:50 - Apache/2.0.55 (Ubuntu) PHP/5.1.2 Server at example.com Port 80</pre> Go to testphp.php . You should see a whole slew of information about your PHP settings. Go to http://example.com/phpmyadmin/ Log into phpMyAdmin as the root user! If everything is working...it's working. = Installing Drupal = Installing CVSapt-get install subversion cvs Installing from Drupal CVSCheckout the Sources<pre>$ cd /var/www/ I'm migrating my personal portal so I'm also going to be checking out some modules. <pre>$ cd /var/www/drupal/modules Repeat that command as needed. Install a theme other than one of the default themes. <pre>$ cd /var/www/drupal/themes
Setup the Drupal DatabaseRemember back in the day when you set the root password for your MySQL server, you're going to need that password right now to create another MySQL user. <pre> First, you must create a new database for your Drupal site mysqladmin -u root -p create databasename MySQL will prompt for the 'dba_user' database password and then create mysql -u root -p Again, you will be asked for the 'dba_user' database password. GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, where 'databasename' is the name of your database Note: Unless your database user has all of the privileges listed If successful, MySQL will reply with: Query OK, 0 rows affected To activate the new permissions, enter the following command: FLUSH PRIVILEGES;</pre> To exit the MySQL Monitor, type <pre>mysql> quit</pre>
I backed up my personal database using mysqldump and uploaded the resulting file to my server. <pre>$ mysqldump -u [user_name] -p --opt [database_name] > /tmp/[dump_file]</pre> Enter your password. Transfer the backup file to the /tmp directory of your server. <pre>$ scp /tmp/[dump_file] root@example.com:/tmp/[dump_file]</pre> Load the Drupal database <pre> From the command line, use (again, replacing 'username' and mysql -u username -p databasename < /tmp/[dump_file]</pre>
Modify your settings.php file to point to your database usign vi <pre>$ vi /var/www/drupal/sites/default/settings.php</pre> This quote from Drupal's INSTALL.txt file explains which line to change in settings.php. Once you've found this line type 'i' to enter insert mode, 'ESC' to exit insert mode, and ':qw' to write the file and quit vi. <pre> The default configuration can be found in the $db_url = "mysql://username:password@localhost/databasename";</pre> <cite>Drupal CVS: INSTALL.txt</cite> = Apache Setup = <em>To Be Continued...</em></pre> Comments and discussion: |
Recent comments
2 years 17 weeks ago
2 years 19 weeks ago
2 years 22 weeks ago
2 years 23 weeks ago
2 years 24 weeks ago
2 years 25 weeks ago
2 years 28 weeks ago
2 years 29 weeks ago