archlinux里:
1、pacman装lighttpd,mysql,php。
先配置lighttpd,编辑/etc/lighttpd/lighttpd.conf文件,把mod_fastcgi的注释取消,向下找到
fastcgi.server = ( ".php" => ((
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
))
)
把注释取消。
编辑/etc/php/php.ini,找到;extension=mysql.so,把前面的;删掉,打开php的mysql支持。
还要把cgi.fix_pathinfo=1前的注释去掉。
最后配置mysql,运行/usr/bin/mysql_secure_installation安装脚本,照提示做就OK了。
启动mysql和lighttpd服务。
/etc/rc.d/mysql start
/etc/rc.d/lighttpd start
编辑/etc/rc.conf文件,在daemons中加入mysqld, lighttpd,让mysql和lighttpd在开机时运行,
到此基础的PHP环境已经安装配置了,写个Hello PHP试试,把index.php(刚才写的Hello PHP)文件扔到/srv/http下,在浏览器中输入http://127.0.0.1/index.php,有输出,一切OK。
2、joomla
先在mysql里为joomla创建一个数据库
mysql -u root -p
CREATE DATABASE joomla;
GRANT ALL PRIVILEGES ON joomla.* TO joomlauser@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON joomla.* TO [email protected] IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit;
到官网下载最新的包,解压缩,扔到/svr/http下面,改用户为root
chown -R root:root joomla
改目录权限为所有人可读写(这样做是为了后面的配置,配置完成后会改回来)
chmod -R 777 joomla
在浏览器里输入http://127.0.0.1/joomla,正常的话会出现joomla的配置页面,报错的童鞋,请检查mysql,php,lighttpd的安装配置是否正确。选一个语言,点下一步,会检测系统环境是否符合要求,少什么补什么吧。
下面是joomla里面自带的安装说明:
REQUIREMENTS
------------
First you must have the base environment for Joomla.
We have thoroughly tested Joomla! on: Linux, Free BSD, Mac OS X and Windows NT/2000.
Linux or one of the BSD's are recommended, but anything else that can run the
3 pieces of software listed below should do it.
Apache -> http://www.apache.org
MySQL -> http://www.mysql.com
PHP -> http://www.php.net
SERVER CONFIGURATION
--------------------
You MUST ensure that PHP has been compiled with support for MySQL and Zlib
in order to successfully run Joomla.
While we have reports that Joomla! works on IIS server we recommend Apache
for running Joomla! on Windows.
OPTIONAL COMPONENTS
-------------------
If you want support for SEF (Search Engine Friendly) URLs, you'll need mod_rewrite and the ability to
use local .htaccess files.
INSTALLATION
------------
1. DOWNLOAD Joomla
You can obtain the latest Joomla! release from:
http://www.joomla.org
Copy the tar.gz file into a working directory e.g.
$ cp JoomlaVx.x.x-Stable.tar.gz /tmp/Joomla
Change to the working directory e.g.
$ cd /tmp/Joomla
Extract the files e.g.
$ tar -zxvf JoomlaVx.x.x-Stable.tar.gz
This will extract all Joomla! files and directories. Move the contents
of that directory into a directory within your web server's document
root or your public HTML directory e.g.
$ mv /tmp/Joomla/* /var/www/html
Alternatively if you downloaded the file to your computer and unpacked
it locally use a FTP program to upload all files to your server.
Make sure all PHP, HTML, CSS and JS files are sent in ASCII mode and
image files (GIF, JPG, PNG) in BINARY mode.
2. CREATE THE Joomla! DATABASE
Joomla! will currently only work with MySQL. In the following examples,
"db_user" is an example MySQL user which has the CREATE and GRANT
privileges. You will need to use the appropriate user name for your
system.
First, you must create a new database for your Joomla! site e.g.
$ mysqladmin -u db_user -p create Joomla
MySQL will prompt for the 'db_user' database password and then create
the initial database files. Next you must login and set the access
database rights e.g.
$ mysql -u db_user -p
Again, you will be asked for the 'db_user' database password. At the
MySQL prompt, enter following command:
GRANT ALL PRIVILEGES ON Joomla.*
TO nobody@localhost IDENTIFIED BY 'password';
where:
'Joomla' is the name of your database
'nobody@localhost' is the userid of your webserver MySQL account
'password' is the password required to log in as the MySQL user
If successful, MySQL will reply with
Query OK, 0 rows affected
to activate the new permissions you must enter the command
flush privileges;
and then enter '/q' to exit MySQL.
Alternatively you can use your web control panel or phpMyAdmin to
create a database for Joomla.
3. WEB INSTALLER
Finally point your web browser to http://www.mysite.com where the Joomla! web
based installer will guide you through the rest of the installation.
4. CONFIGURE Joomla
You can now launch your browser and point it to your Joomla! site e.g.
http://www.mysite.com -> Main Site
http://www.mysite.com/administrator -> Admin
You can log into Admin using the username 'admin' along with the
password that was generated or you chose during the web based install.
Joomla! ADMINISTRATION
----------------------
Upon a new installation, your JoomlaS website defaults to a very basic
configuration with only a few active components, modules and templates
(CMTs).
Use Admin to install and configure additional CMTs, add users, select
default language and much more.
Note that additional community-contributed CMTs and languages are