Prerequisites for setting up a php website running environment under Ubuntu10.04: to open the root permission sudopassword [enter the root password here] 1. Step 1 install Ubuntu10.042, update the source sudoapt-getupdate3, install lighttpdsudoapt-getinstalllighttpd, and then check to build the php website runtime environment under ligh Ubuntu 10.04
Prerequisites:
To enable the root permission
Sudo password [enter the root password here]
1. Step 1 install Ubuntu 10.04
2. update source
Sudo apt-get update
3. install lighttpd
Sudo apt-get install lighttpd
After installation, check whether lighttpd is successfully started. open the URL: http: // localhost/in the browser/
If it is displayed as its works, the surface is successfully displayed.
If not, end the lighttpd process.
Then enter
Sudo lighttpd-f/etc/lighttpd. conf
4. install PHP
Sudo apt-get install php5
Continue after completion
Sudo apt-get install php5-cli
Continue after completion
Sudo apt-get install php5-cgi
Continue after completion
Sudo apt-get install php5-mysql
Let lighttpd support cgi mode
# Lighttpd-enable-mod fastcgi
Restart Lighttpd
#/Etc/init. d/lighttpd restart
5. change the owner of the/var/www folder to the current user (some may not need this step)
Sodu chown-R xu2006: xu2006/var/www
In this way, the owner of the www folder is xu2006, so that the file can be written.
During the installation process, you will be prompted to enter the management password
8. install phpmyadmin to manage mysql
Sudo apt-get install phpmyadmin
When it prompts you to select the web server, do not select anything, and then install it OK.
Move phpmyadmin to/var/www and we can use phpmyadmin to manage mysql.
# Sudo mv/usr/share/phpadmin/var/www
Open http: // localhost/phpmyadmin to check whether mysql can be managed.
At this point, the php website runtime environment is ready! Now you can download some php-type website programs for installation and testing to check your labor results.
Php programs include discuz wordpress and so on.
Root folder permission
Sudo chmod-R 0777/home/1.txt
Sudo chmod-R [permission] [Directory or file]
Sudo chwon-R root: root/var/www
Sudo chown-R [user name: User Group] [Directory or file]
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.