分类 Ubuntu 下的文章

You have two options to install Wordpress in Ubuntu 9.10. The first option is to download and install Wordpress manually. If you are in a shared web hosting environment, you have to do this way.

The second option is to install it from the Ubuntu's repository. If you are the root, you can just type:

apt-get install wordpress

Everything will be installed and configured automatically for you.

However, you need to change following configuration manually, otherwise the Wordpress can only be visited at your local host, like http://localhost/wordpress/. If you visit it from network, like http://your_ip_address/wordpress, you will get an error.

You can solve it as following:

cd /etc/wordpress/

sudo cp config-localhost.php config-newhostname.php

sudo chown www-data config-newhostname.php


Q. I am using Apache server and PHP5. How do I install install php gd support?

A. PHP is used mainly in server-side application software along with various addons.

PHP includes a large number of free and open source libraries with the core build. PHP is a fundamentally Internet-aware system with modules built in for accessing FTP servers, many database servers, embedded SQL libraries such as embedded MySQL and SQLite, LDAP servers, and others. Many functions familiar to C programmers such as those in the stdio family are available in the standard PHP build.

The GD Graphics Library for dynamically manipulating images. You will need to compile PHP with the GD library of image functions for this to work.

However Ubuntu (and Debian) comes with package called php5-gd

Just type following command to install this module:
# apt-get install php5-gd
OR
$ sudo apt-get install php5-gd

Restart Apache
# /etc/init.d/apache2 restart

Test your php application.

If you have an Ubuntu installation, and want to check what version it is, you have a number of options. The most "right" way I've found is to simply look at the /etc/lsb-release file, which should tell you explicitly what version of Ubuntu is installed, its codename, and its version number.

Or, if you like the command line, run lsb_release -a

Of course, you could do a number of other things instead, like looking at /etc/apt/sources.list to see what version of Ubuntu you're pulling packages from. But I thought the above method was nice, and not often mentioned.

Remove a Service:
# update-rc.d -f apache2 remove
cd /etc/init.d
# update-rc.d -f apache2 remove
Removing any system startup links for /etc/init.d/apache2 ...
/etc/rc0.d/K09apache2
/etc/rc1.d/K09apache2
/etc/rc2.d/S91apache2
/etc/rc3.d/S91apache2
/etc/rc4.d/S91apache2
/etc/rc5.d/S91apache2
/etc/rc6.d/K09apache2

Add a Service:
# update-rc.d apache2 start 91 2 3 4 5 . stop 09 0 1 6 .
Adding system startup for /etc/init.d/apache2 ...
/etc/rc0.d/K09apache2 -> ../init.d/apache2
/etc/rc1.d/K09apache2 -> ../init.d/apache2
/etc/rc6.d/K09apache2 -> ../init.d/apache2
/etc/rc2.d/S91apache2 -> ../init.d/apache2
/etc/rc3.d/S91apache2 -> ../init.d/apache2
/etc/rc4.d/S91apache2 -> ../init.d/apache2
/etc/rc5.d/S91apache2 -> ../init.d/apache2