9.17

Posted xiaowoniu1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了9.17相关的知识,希望对你有一定的参考价值。

建yum源
mkdir /dvd
mount /dev/cdrom /dvd
cd /etc/yum.repos.d/
内容:
vi dvd.repo
[dvd]
name=dvd
baseurl=file:///dvd
gpgcheck=0
测试
yum repolist
关闭防火墙
iptables -F
firewall-cmd--permanent--add-service=mysql
firewall-cmd--permanent --add-service=mysql
firewall-cmd --permanent --add-service=mysql
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
下载安装大量的组件
cd /
cd ~
ls
使用CRT
rz
mv cmake-2.8.11.2.tar.gz Discuz_X3.2_SC_GBK.zip freetype-2.5.3.tar.gz jpegsrc.v9a.tar.gz libgd-2.1.0.tar.gz libmcrypt-2.5.8.tar.gz libpng-1.6.12.tar.gz libvpx-v1.3.0.tar.bz2 mysql-5.6.19.tar.gz nginx-1.6.0.tar.gz openssl-1.0.1h.tar.gz pcre-8.35.tar.gz php-5.5.14.tar.gz t1lib-5.1.2.tar.gz tiff-4.0.3.tar.gz yasm-1.2.0.tar.gz zlib-1.2.8.tar.gz /usr/local/src
ls
yum安装编译工具及库文件
yum install -y apr* autoconf automake bison bzip2 bzip2* compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-devel
安装cmake编译工具
cd /usr/local/src
ls
tar xzvf cmake-2.8.11.2.tar.gz
cd cmake-2.8.11.2/
./configure
make
make install
配置Mysql
cd /usr/local/src
ls
创建账号
useradd mysql -s /sbin/nologin
创建数据库程序和文件目录,设置属主属组
mkdir -p /usr/local/mysql/var
chown -Rf mysql:mysql /usr/local/mysql/var
安装Mysql服务程序
tar xzvf mysql-5.6.19.tar.gz
cd mysql-5.6.19/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/var/local/mysql/var-DSYSCONFDIR=/etc
make
make install
删除原有mysql系统默认配置文件
cd /etc
ls
mv my.cnf my.cnf.bz
ls
生成系统数据库
cd /usr/local/mysql
ls
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var
make
make install
创建配置文件的软链接
ln -s /usr/local/mysql/my.cnf /etc/my.cnf
设置开机启动项
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 755 /etc/init.d/mysqld
chkconfig mysqld on
编辑启动项配置文件
vim /etc/rc.d/init.d/mysqld
46/47行:
basedir=/usr/local/mysql
datadir=/usr/local/mysql/var
重启
systemctl restart mysqld
添加环境变量
vim /etc/profile
shift+g 尾行加入:
export PATH=$PATH:/usr/local/mysql/bin
写入:
source /etc/profile
将mysqld服务程序库文件链接到默认位置
mkdir /var/lib/mysql
cd ..
ln -s /usr/local/mysql/lib/mysql/usr/lib/mysql
ln -s /usr/local/mysql/include/mysql/usr/include/mysql
ln -s /tmp/mysql.sock/var/lib/mysql/mysql/mysql.sock
初始化mysqld服务程序:
mysql_secure_installation
回车
y
密码:
重复密码:





























































































以上是关于9.17的主要内容,如果未能解决你的问题,请参考以下文章

9.17,网易游戏(互娱)笔试,第一题

9.17lnmp练习,(未完)

9.17

9.17 simulated match

9.17

9.17homework