Chinaunix首页 | 论坛 | 博客
  • 博客访问: 112196
  • 博文数量: 29
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 240
  • 用 户 组: 普通用户
  • 注册时间: 2014-07-11 15:42
个人简介

多少人爱你青春欢畅的时辰, 爱你的美丽假意和真心, 只有一个人爱你那朝圣者的灵魂, 爱你衰老了的连上痛苦的皱纹.

文章分类

全部博文(29)

文章存档

2018年(1)

2015年(2)

2014年(26)

我的朋友

分类: LINUX

2018-04-11 11:41:46

tar -zxvf unixODBC.tar.gz
./configure --prefix=/usr/local/unixodbc
make && make install

yum install ncurses-devel

groupadd mysql
useradd -s /sbin/nologin -g mysql -M mysql
rpm -qa|grep mysql 
rpm -e mysql-libs-5.1.73-3.el6_5.x86_64 --nodeps \\force delete lib

[root@centos6 ~]# mkdir /usr/local/mysql //安装目录
[root@centos6 ~]# mkdir /usr/local/mysql/data  //数据仓库目录
[root@centos6 ~]# chown -R mysql.mysql /usr/local/mysql/ //分配权限

mkdir bld && cd bld
\\Installing Mysql using a standard source distrbution https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html
\\cmake options link: https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html 
\\cmake .. -LH
cmake .. -DWITH_LIBWRAP=ON -DDOWNLOAD_BOOST=1 -DWITH_BOOST=../boost \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ \\数据库程序安装路径; 
-DSYSCONFDIR=/etc \
-DWITH_MYISAM_STORAGE_ENGINE=1 \ \\MYISAM引擎支持(1|0) 
-DWITH_INNOBASE_STORAGE_ENGINE=1 \ \\innoDB引擎支持(1|0) 
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \ \\默认位置是/var/lib/mysql/mysql.sock,如果指定其他路径,需要做一个软链接,或者在配置文件my.cnf中进行设置。
-DMYSQL_TCP_PORT=3306 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \ \\扩展支持编码(all | utf8,gbk,gb2312 | none) 
-DDEFAULT_CHARSET=utf8 \ \\默认数据库编码
-DDEFAULT_COLLATION=utf8_general_ci \ \\默认数据库整理编码
-DWITH_DEBUG=0 \
-DWITH_SSL=system \
-DENABLE_DOWNLOADS=1 \
-DMYSQL_DATADIR=/usr/local/mysql/data \\数据库文件存放路径(不配置的话会默认创建$PREFIX_DIR/data)
\\-DWITH_MEMORY_STORAGE_ENGINE=1 \
\\-DWITH_READLINE=1 \
\\-DMYSQL_USER=mysql \
\\-DODBC_INCLUDES=/usr/local/unixodbc/include/ \
\\-DODBC_LIB_DIR=/usr/local/unixodbc/lib/ \
\\-DWITH_UNIXODBC=1 \ \\Enables unixODBC support, for Connector/ODBC.
\\-DWITH_CURL=system \
\\-DWITH_SYSTEMD=1 \
make -j4
make install 
make clean

vim /etc/my.cnf

[mysqld]
datadir=/usr/local/mysql/data
socket=/usr/local/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

cd /usr/local/mysql
bin/mysqld --user=mysql --initialize-insecure --user=mysql --datadir=/usr/local/mysql/data
/usr/local/mysql/support-files/mysql.server start

cd /usr/local/mysql   
chown -R mysql:mysql .
cd /usr/local/mysql/data
chown -R mysql:mysql .

初始化数据库
cd /usr/local/mysql
/usr/local/mysql/bin/mysql_install_db --user=mysql --datadir=/usr/local/mysql/data

# 获取临时密码
grep 'temporary password' /var/log/mysqld.log
# 使用临时密码登录
mysql -u root -p
# 修改root账户的密码
ALTER USER 'root'@'localhost' IDENTIFIED BY '11111111a';

----------------------------------------------------------------------------------------

rpm -q make gcc gcc-c++ zlib-devel libtool libtool-ltdl libtool-ltdl-devel bisonncurses-devel
yum -y install make gcc gcc-c++ zlib-devel libtool libtool-ltdllibtool-ltdl-devel bison ncurses-devel libaio

yum install libxml
tar -zxvf libxml2-2.9.0.tar.gz
cd ./libxml2-2.9.0
./configure --prefix=/usr/local/libxml2/ 
make && make install

tar -zxvf libmcrypt-2.5.7.tar.gz
cd ./libmcrypt
./configure --prefix=/usr/local/libmcrypt/
make -j4
make install 
cd /usr/local/lamp/libmcrypt-2.5.7/libltdl
./configure -enable-ltdl-install
make -j4
make install 

tar -zxvf zlib.tar.gz
./configure --prefix=/usr/local/zlib/ 
make && make install

[root@centos6 LAMP]# cd /usr/local/LAMP 
[root@centos6 LAMP]# tar -zxvf libpng-1.5.4.tar.gz 
[root@centos6 LAMP]# cd ./libpng-1.5.4 
[root@centos6 libpng-1.5.4]# ./configure --prefix=/usr/local/libpng/ --enable-shared 
[root@centos6 libpng-1.5.4]# make && make install

[root@centos6 LAMP]# tar -zxvf jpegsrc.v9a.tar.gz 
[root@centos6 LAMP]# cd ./jpeg-9a/ 
[root@centos6 jpeg-9a]# mkdir /usr/local/jpeg/ (创建jpeg软件的安装目录)
[root@centos6 jpeg-9a]# mkdir /usr/local/jpeg/bin/ (创建存放命令的目录)
[root@centos6 jpeg-9a]# mkdir /usr/local/jpeg/lib/ (创建jpeg库文件所在目录)
[root@centos6 jpeg-9a]# mkdir /usr/local/jpeg/include/ (创建存放头文件目录)
[root@centos6 jpeg-9a]# mkdir -p /usr/local/jpeg/man/man1(建立存放手册的目录)
[root@centos6 jpeg-9a]# ./configure --prefix=/usr/local/jpeg/ --enable-shared --enable-static(建立共享库使用的GNU的libtool和静态库使用的GNU的libtool)
[root@centos6 jpeg-9a]# make && make install

[root@centos6 LAMP]# cd /usr/local/LAMP 
[root@centos6 LAMP]# tar -zxvf freetype-2.5.3.tar.gz 
[root@centos6 LAMP]# cd ./freetype-2.5.3
[root@centos6 freetype-2.5.3]#./configure --prefix=/usr/local/freetype/ --enable-shared 
[root@centos6 freetype-2.5.3]# make && make install

[root@centos6 LAMP]# cd /usr/local/LAMP 
[root@centos6 LAMP]# tar -zxvf autoconf-2.69.tar.gz 
[root@centos6 LAMP]# cd ./autoconf-2.69
[root@centos6 autoconf-2.69]# ./configure 
[root@centos6 autoconf-2.69]# make && make install

[root@centos6 LAMP]# cd /usr/local/LAMP 
[root@centos6 LAMP]# tar -zxvf libgd-2.1.0.tar.gz 
[root@centos6 LAMP]# cd ./libgd-2.1.0
[root@centos6 libgd-2.1.0]# ./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg/ --with-png=/usr/local/libpng/ --with-zlib=/usr/local/zlib/ --with-freetype=/usr/local/freetype/
[root@centos6 libgd-2.1.0]# make && make install

[root@centos6 LAMP]# yum remove apr apr-util
[root@centos6 LAMP]# tar zxvf apr-1.5.2.tar.gz 
[root@centos6 LAMP]# cd apr-1.5.2
[root@centos6 apr-1.5.2]# ./configure --prefix=/usr/local/apr-httpd/ && make && make install

[root@centos6 LAMP]# tar zxvf apr-util-1.5.4.tar.gz 
[root@centos6 LAMP]# cd apr-util-1.5.4
[root@centos6 apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/ && make && make install

[root@centos6 LAMP]# unzip pcre-8.34.zip 
[root@centos6 LAMP]# cd pcre-8.34 
[root@centos6 pcre-8.34]# ./configure --prefix=/usr/local/pcre 
[root@centos6 pcre-8.34]# make 
[root@centos6 pcre-8.34]# make install 

安装apache
[root@centos6 LAMP]# tar zxvf httpd-2.4.18.tar.gz 
[root@centos6 LAMP]# cd httpd-2.4.18
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-deflate --enable-speling--enable-cache --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-so --enable-expires=shared --enable-rewrite=shared --enable-static-support --sysconfdir=/etc/httpd --with-z=/usr/local/zlib/ --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/ --with-pcre=/usr/local/pcre/ --disable-userdir
[root@centos6 httpd-2.4.18]# make && make install
安装完成后,进入/usr/local/apache2/目录下,检查是否有以下文件:
bin build cgi-bin error htdocs icons include 
logs man manual modules 
启动Apache服务器,并查端口是否开启,启动Apache服务器的命令行如下:
[root@centos6 httpd-2.4.18]# /usr/local/apache2/bin/apachectl start
添加到快速启动:
[root@centos6 httpd-2.4.18]#cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
以后就可以这样了:
/etc/init.d httpd stop
/etc/init.d httpd start
/etc/init.d httpd restart
如果不能启动,提示信息:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
解决方案:
root@centos6 httpd-2.4.18]# vim /etc/httpd/httpd.conf
写入:
ServerName localhost:80
重启apache
service httpd stop
service httpd start
查看端口号,应该是这样的:
netstat -tnl|grep 80
tcp 0     0 0.0.0.0:80     0.0.0.0:*    LIST
测试,浏览器输入你的IP地址,出现It works!安装成功
设置开机启动:
vim /etc/rc.local
添加: 
/usr/local/apache/bin/apachectl start
:wq保存退出

------------------------------------------------------------------------------

PHP安装

tar -zxvf openssl
./config --prefix=/usr/local/openssl   --openssldir=/usr/local/openssl -enable-zlib  --with-zlib-lib=/usr/local/zlib/lib --with-zlib-include=/usr/local/zlib/include
make && make install
./config -t
make depend
在/etc/ld.so.conf文件的最后面,添加如下内容:/usr/local/openssl/lib 
然后执行以下命令
ldconfig

wget https://curl.haxx.se/download/curl-7.59.0.tar.gz
cd curl
./configure -prefix=/usr/local/curl --with-php-config=/usr/local/php/bin/php-config
make -j4 && make install -j4

先安装libXpm-devel
不然PHP或报错: make: * [ext/gd/gd.lo] Error 1
安装:
[root@centos6 ~]# yum -y install libXpm-devel
找出文件位置:
 rpm -ql libXpm-devel
应该是这个位置,记住它,后面安装PHP要配置 --with-xpm-dir=/usr/lib64
/usr/lib64/libXpm.so
[root@ITMontest ~]# ln -s /usr/lib64/libXpm.so* /usr/lib/
[root@ITMontest ~]# ln -s /usr/lib64/libltdl.so* /usr/lib/

[root@ITMontest lib]# cd /usr/local/mysql/lib
[root@ITMontest lib]# ln -s libmysqlclient.so.15.0.0 libmysqlclient_r.so^C

./configure \ 
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \ //配置文件路径,指定php.ini位置
--with-config-file-scan-dir=/etc/php.d \
--with-apxs2=/usr/local/apache2/bin/apxs \ // apxs功能是使用mod_so中的//LoadModule指令,加载指定模块到apache,要求apache 要打开SO模块
--with-mysql=/usr/local/mysql \ //mysql安装目录,对mysql的支持
--with-mysqli=/usr/local/mysql/bin/mysql_config\ //mysqli文件目录,优化支持
--with-libxml-dir=/usr/lib64 \ //打开libxml2库的支持
--with-png-dir=/usr/local/libpng \ //打开对png图片的支持
--with-jpeg-dir=/usr/local/jpeg \ //打开对jpeg图片的支持
--with-freetype-dir=/usr/local/freetype \ //打开对freetype字体库的支持
--with-gd=/usr/local/gd \ //打开gd库的支持 
--with-zlib-dir=/usr/local/zlib \ //打开zlib库的支持
--with-mcrypt=/usr/local/libmcrypt \ //打开libmcrypt库的支持
--with-xpm-di=/usr/lib64 \ //打开libXpm库的支持 
--with-iconv=/usr/libiconv \
--with-openssl=/usr \
--enable-soap  --enable-mbstring=all \ //多字节,字符串的支持
--enable-sockets \ //打开sockets 支持
--enable-xml \

./configure \
 --prefix=/usr/local/php \
 --with-config-file-path=/usr/local/php/etc \
 --with-config-file-scan-dir=/etc/php.d \
 --with-apxs2=/usr/local/apache2/bin/apxs \
 --with-mysql=/usr/local/mysql \
 --with-mysqli=/usr/local/mysql/bin/mysql_config\
 --with-libxml-dir=/usr/lib64 \
 --with-png-dir=/usr/local/libpng \
 --with-jpeg-dir=/usr/local/jpeg \
 --with-freetype-dir=/usr/local/freetype \
 --with-gd=/usr/local/gd \
 --with-zlib-dir=/usr/local/zlib \
 --with-mcrypt=/usr/local/libmcrypt \
 --with-xpm-dir=/usr/lib64 \
 --with-iconv=/usr/libiconv \
 --enable-soap  --enable-mbstring=all \
 --enable-sockets \
 --enable-xml \
 --enable-mbstring \
 --with-openssl=/usr/local/openssl \
--with-curl=/usr/local/curl \
make && make test

复制配置文件
[root@localhost php-5.6.13]# cp php.ini-development /usr/local/php/etc/php.ini
更改Apache文件,解析PHP
vim /etc/httpd/httpd.conf
vim /etc/php.ini
extension=openssl.so

在LoadModule模块中添加(如果存在请跳过)
LoadModule php5_module modules/libphp5.so
检查文件是否存在
cd /usr/local/apache2/modules

ls -al

看看有没有这个文件

libphp5.so
编辑apache配置文件
vim /etc/httpd/httpd.conf

找到
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz 
在下面添加
AddType application/x-httpd-php .php .phtml 
AddType application/x-httpd-php-source .phps

找到
DirectoryIndex index.html
修改为
DirectoryIndex index.php index.html index.htm
重启apache
service httpd stop
service httpd start
验证
apache服务器的网站根目录为 /usr/local/apache2/htdocs/

vim /usr/local/apache2/htdocs/index.php
写入
     phpinfo();
?> 
:wq  保存退出
浏览器访问

date模块下可能会出现:

It is not safe to rely on the system’s timezon....
解决:

vim /usr/local/php/etc/php.ini
找到:
;date.timezone =
改成:
date.timezone = "Asia/Shanghai"
重启apache:
service httpd restart
安装完成

cd /usr/local/lamp/php-5.7.2/ext/openssl
ln -s config0.m4 config.m4
/usr/local/php/bin/phpize 
./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config
make && make test && make install

cd /usr/local/lamp/php-5.7.2/ext/mbstring
/usr/local/php/bin/phpize 
./configure --with-php-config=/usr/local/php/bin/php-config 

cd /usr/local/lamp/php-5.7.2/ext/curl
/usr/local/php/bin/phpize 
./configure --with-curl=/usr/local/curl --with-php-config=/usr/local/php/bin/php-config
make && make test && make install

download glpi:


extract to  /var/www/html/
Edit:
[root@ITMontest changelogbak]# ll
total 224
central.class.php
html.class.php
[root@ITMontest changelogbak]# pwd
/var/www/html/glpi/inc/
/var/www/html/glpi/pic/
fd_logo.png
login_logo_glpi.png

https://blog.csdn.net/pyounger/article/details/71698611


阅读(1246) | 评论(0) | 转发(0) |
0

上一篇:linux系统删除重复文件

下一篇:没有了

给主人留下些什么吧!~~