设为首页 收藏本站
查看: 438|回复: 0

[经验分享] Install Apache, MySQL5, PHP5 and PHPMyAdmin on Ubuntu2

[复制链接]

尚未签到

发表于 2018-11-29 06:56:23 | 显示全部楼层 |阅读模式
Install Apache2, MySQL5, PHP5 and PHPMyAdmin on Ubuntu

This
is a collection of guide how to install Apache Httpd Web Server
complete with latest PHP (as Apache mod), MySQL for Ubuntu. As a bonus,
I even through in an additional guide to install PHPMyAdmin. Please do
note that most of this guide can be found elsewhere which is listed at
the bottom of the guide.



Getting Started

I’m sure everyone here is familiar on how to use Terminal which is available from:

Applications > Accessories > Terminal
Install Apache Httpd Web Server

To install Apache, type the following command into your Terminal:

> sudo apt-get install apache2
Testing Apache

Paste the following command into your Terminal

> sudo /etc/init.d/apache2 start
Then open de>http://localhost/de> or de>http://127.0.0.1de> from your web browser. At first run, you would probably see a directory listing or a HTML page with a text saying “It’s Work“.
It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.


To browse the file please navigate to the following folder

> cd /var/www/
Install PHP

Similar to Apache, all you need to do is type the following command in your Terminal:

> sudo apt-get install php5 libapache2-mod-php5
After the installation is complete, do restart your Apache Http Web Server.

> sudo /etc/init.d/apache2 start
This allow PHP to be include as Apache mod.

Testing PHP

A simple way to test your PHP is via phpinfo() function which
display all related configuration of your PHP. To do so type the
following command in your Terminal.

> sudo gedit /var/www/phpinfo.php
This will open gEdit text editor which you will type in


  •   


Open http://localhost/phpinfo.php in your web browser and you will get something like this:  
PHP Version 5.2.10-2ubuntu6.3

System Linux ubuntu 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686
Build Date Nov 26 2009 14:16:37
Server API Apache 2.0 Handler
Virtual Directory Support disabled

You should see all of the info about your PHP installation listed on the page.

Install MySQL

Again, type the following command in your Terminal

> sudo apt-get install mysql-server
Note: As MySQL is installing, it will ask you to
configure your root password. Make sure that you type it correctly, as
it will only ask you once.

You might need to manually start MySQL  for the first time, do so by typing this command in your Terminal.

> sudo /etc/init.d/mysql start
Testing MySQL

After that is finished, you can test MySQL by running this, where 123 is your password

> mysql -uroot -p123
mysql> show databases;
mysql> quit
Install PHPMyAdmin

As usual, run the following command in terminal

> sudo apt-get install phpmyadmin
This process is quite, as slow as MySQL installation and there are
time you need to provide some information in order to complete the
process but it quite optional. Once finish you need to create a soft
link in de>/var/www/de> to de>/usr/share/phpmyadminde> using these command.

> sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
Now open up de>http://localhost/phpmyadmin de>your web browser.

Conclusion

If you find anything missing do drop a comment below. Any additional information are also welcome.



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-640893-1-1.html 上篇帖子: apache tomcat了解 下篇帖子: 实战CentOS5.2+Apache2.2.10+Mysql5.1.34+PHP5.2.9+ZendOptimizer
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表