源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

linux 下配置LAMP环境

  • 时间:2020-11-27 23:24 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:linux 下配置LAMP环境
[b]1.准备[/b] 根据系统的不同,可能准备的文件也不同,我用的是Ubuntu Linux ,我已将以下五个文件打包,点击下方链接下载吧 httpd-2.2.9.tar.gz mysql-5.1.52.tar.gz php-5.3.5.tar.gz libxml2-2.7.7.tar.gz ncurses-5.6.tar.gz 百度网盘下载:trigkit4@ubuntu:~$ su root Password: root@ubuntu:/home/trigkit4# groupadd mysql root@ubuntu:/home/trigkit4# useradd -g mysql mysql //解压压缩包,首先进入下载文件所在目录 $ cd /home/trigkit4/Downloads tar -zxvf mysql-5.1.52.tar.gz //进入解压出来的文件夹 root@ubuntu:/home/trigkit4/Downloads# cd mysql-5.1.52 //进入目录解压ncurses-5.6.tar.gz cd /home/trigkit4/Downloads tar -zxvf ncurses-5.6.tar.gz //再进入ncurse-5.6文件夹 root@ubuntu:/home/trigkit4/Downloads/mysql-5.1.52# cd /home/trigkit4/Downloads/ncurses-5.6 //配置安装目录等信息 ./configure  --prefix=/usr/local/ncurses  --with-shared  --without-debug  --enable-widec //编译,有点耗时 root@ubuntu:/home/trigkit4/Downloads/ncurses-5.6# make //安装 root@ubuntu:/home/trigkit4/Downloads/ncurses-5.6# sudo make install
[b]3.安装Apache[/b]
root@ubuntu:/home/trigkit4# cd /home/trigkit4/Downloads/httpd-2.2.9 //配置安装目录 root@ubuntu:/home/trigkit4/Downloads/httpd-2.2.9# ./configure -prefix=/home/trigkit4/Downloads/apache -enable-so //编译 root@ubuntu:/home/trigkit4/Downloads/httpd-2.2.9# make //安装 root@ubuntu:/home/trigkit4/Downloads/httpd-2.2.9# sudo make install
[b]4.安装libxml2[/b]
root@ubuntu:/home/trigkit4# cd /home/trigkit4/Downloads //解压libxml软件包 tar -zxvf libxml2-2.7.7.tar.gz //进入解压后的文件目录 root@ubuntu:/home/trigkit4/Downloads# cd libxml2-2.7.7 //配置 $ ./configure //编译 $ make //安装 $ sudo make install
[b]5.安装php[/b]
root@ubuntu:/home/trigkit4/Downloads# cd /home/trigkit4/Downloads/php-5.3.5 //进入libxml2文件目录并安装libxml2 ./configure --prefix=/usr/local/libxml2/ //配置目录 ./configure --with-apxs2=/opt/www/bin/apxs //编译 $ make //安装 $ make install
[img]http://files.jb51.net/file_images/article/201503/201503250937037.jpg[/img] [b]配置[/b]
root@trigkit4:~# tar -zxvf abc.tar.gz (记住'z'代表了.tar.gz) root@trigkit4:~# tar -jxvf abc.tar.bz2 (记住'j'代表了.tar.bz2) root@trigkit4:~# tar -cvf archieve.tar.gz(.bz2) /path/to/folder/abc     tar -cvf /tmp/etc.tar /etc <==仅打包,不压缩!     tar -zcvf /tmp/etc.tar.gz /etc <==打包后,以 gzip 压缩     参数:     -c :建立一个压缩文件的参数指令(create 的意思);     -x :解开一个压缩文件的参数指令!     -t :查看 tarfile 里面的文件!     特别注意,在参数的下达中, c/x/t 仅能存在一个!不可同时存在!     因为不可能同时压缩与解压缩。     -z :是否同时具有 gzip 的属性?亦即是否需要用 gzip 压缩?     -j :是否同时具有 bzip2 的属性?亦即是否需要用 bzip2 压缩?     -v :压缩的过程中显示文件!这个常用,但不建议用在背景执行过程!     -f :使用档名,请留意,在 f 之后要立即接档名喔!不要再加参数!        例如使用『 tar -zcvfP tfile sfile』就是错误的写法,要写成        『 tar -zcvPf tfile sfile』才对喔!     -p :使用原文件的原来属性(属性不会依据使用者而变)     -P :可以使用绝对路径来压缩!     -N :比后面接的日期(yyyy/mm/dd)还要新的才会被打包进新建的文件中!     --exclude FILE:在压缩的过程中,不要将 FILE 打包! 查找/编译 命令locate用以快速查找文件、文件夹  locate keyword 命令find用以高级查找文件、文件夹  find 查找位置 查找参数 在 Linux 系统安装每个源代码软件包的过程如下: △ 配置(configure) △ 编译(make) △ 安装(make install) 查看linux的内核版本,系统信息,常用的有三种办法: uname -a;   more /etc/issue;    cat /proc/version;
[b]Apache命令[/b]
[url=http://localhost/phpmyadmin]http://localhost/phpmyadmin[/url],看有没有数据库管理软件出现。
[img]http://files.jb51.net/file_images/article/201503/201503250937049.png[/img] 请您花一点时间将文章分享给您的朋友或者留下评论。我们将会由衷感谢您的支持!
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部