Ubuntu is different from Windows. It has a command line that I like, a simple interface, and a feeling that I want. It is a good idea to occasionally change the working environment and learn the Linux way of thinking. I have used Ubuntu before, but I found it cumbersome and lacked the depth to use it. Now I saw a tutorial on setting up wordpress on Ubuntu on the Internet, and my interest has risen again. Plus 10.04 has just been released, so I want to play with it.
1. Install apache, php5, mysql
First, let’s install apache and php5. Follow the steps below to install step by step:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart // Restart apache, now php5 is available
Next, we install mysql:
sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo /etc/init.d/apache2 restart // Restart apache again to activate the new service normally
Then enter in the terminal:
sudo ls /etc/apache2/mods-enabled
Check if there are php5.conf and php5.load in this directory. If If not:
sudo a2enmod php5
Enable the php module and then restart apache. OK, apache, php5, and mysql are all available. Of course, you can also install wordpress. However, we still need to make some preparations to make it more convenient for us to use.
2. Install phpmyadmin
Download the software package on the phpmyadmin website and extract it to the local directory /var/www/phpmyadmin (/home/user/www/phpmyadmin). Execute in the terminal:
sudo cp /var/www/phpmyadmin/config.sample.inc.php
/var/www/phpmyadmin/config.inc.php
sudo gedit /var/www/phpmyadmin /config.inc.php
Find "blowfish_secret" and fill in any letters after it. Save and exit! And start installing php5-mcrypt:
sudo apt-get install php5-mcrypt
Edit the php configuration file:
sudo gedit /etc/php5/apache2/php.ini
Add < under extension ph26> extension=php5-mcrypt.so
3. For the step of installing wordpress
, you can go to wordpress.org to download the latest wordpress installation package, unzip it, and put the wordpress package in the /var/www/ directory. You can install it according to the WP installation method. Okay, the WordPress installation is complete, I feel a sense of accomplishment. Now, you want to modify the theme and work on it.
Oops, there's a problem! Theme files cannot be modified in the background/xml cannot be imported in the background. Oops! How to solve this problem? It doesn't matter, as long as you open the terminal and enter the following command:
sudo chmod -R 777 /var/www/
Set the permissions of the /var/www/ directory to 777, DONE!
Ubuntu10.4 official download address http://releases.ubuntu.com/releases/10.04/
OK, everything is OK. You can test it anywhere locally. Of course, it is a bit troublesome to configure it yourself. There is also a very simple method, which is to use the software of the local environment. Please see the blog post: https://www.vpsok.net/other/article_2006.html? (Quickly build a local test environment)