首页
技术知识库
Task工作计划
网站简介
DON框架
后台管理
文章分类
JAVA
框架知识
操作系统
容器相关
数据库层
优化技术
界面编程
网络编程
开发工具
GO语言
其他
读书随笔
观影随笔
每日随笔
APP
linux系统命令备忘[Linux]
所属分类
:[操作系统] |
创建时间
:2013-01-13 |
文章属性
:原创 |
文章来源
:http://windfly.cn |
作者
:windfly
<p> </p> <h1> ANT </h1> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> tar -zxvf apache-ant-1.8.1-bin.tar.gz </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> vi /etc/profile </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> ANT_HOME=/usr/local/apache-ant-1.8.1 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> export JAVA_HOME JAVA_BIN ANT_HOME PATH CLASSPATH </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> source /etc/profile </p> <h1> <span>网络</span> </h1> <p> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 配置ip地址 /etc/sysconfig/network-scripts/ifcfg-eth0 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 关闭防火墙 service iptables stop </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <h1> <span>时间</span> </h1> <p> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 查看时区 cat /etc/sysconfig/clock </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 重置时区 cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 重置时间 date –s 06/22/11 date –s 15:52:00 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 将新时间写入CMOS clock –w </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <h1> <span>java</span> </h1> <p> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 将JDK加入环境<span style="white-space: pre"> </span>vi /etc/profile </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> export JAVA_HOME=/home/jdk1.6.0 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> export CLASSPATH=/home/jdk1.6.0/jre/lib:$JAVA_HOME/lib:$CLASSPATH </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> export PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/bin:$PATH </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 将环境文件马上起效: 使用source /etc/profile </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <h1> <span>mysql</span> </h1> <p> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 设置默认字符集为utf-8 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> vi /etc/my.cnf </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 在文件最后加入 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> default-character-set = utf8 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> [mysql]default-character-set=utf8 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 设置mysql随系统启动 chkconfig mysqld on </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 启动服务 service mysqld start </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 设置根用户密码(root):mysqladmin –u root password root。 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 赋予权限给远程用户 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> grant all on *.* to 'test'@'%' IDENTIFIED BY 'root' with grant option; </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> grant all on *.* to 'test'@'127.0.0.1' IDENTIFIED BY 'root' with grant option; </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> grant all on *.* to 'test'@'localhost' IDENTIFIED BY 'root' with grant option; </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 设置数据库上传文件最大值 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> set global max_allowed_packet = 16*1024*1024*10 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> 编译源码包 </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> mkdir -p /usr/local/src/mysql </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> mv mysql-5.1.42.tar.gz /usr/local/src/mysql </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> cd /usr/local/src/mysql </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> tar zxvf mysql-5.1.42.tar.gz </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> cd mysql-5.1.42.tar.gz </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> ./configure --help </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> CC=gcc CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-thread-safe-client --enable-assembler --with-big-tables --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=complex </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> make </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> make install </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> cp ./support-files/my-medium.cnf /etc/my.cnf </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> ./scripts/mysql_install_db --user=mysql </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> chown -R mysql.mysql /usr/local/mysql/var </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> chmod -R 700 /usr/local/mysql/var </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> chmod +x /etc/rc.d/init.d/mysqld </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> chkconfig --add mysqld </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> chkconfig --list mysqld </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> service mysqld start </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> vi /etc/profile </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> PATH=$PATH:/usr/local/mysql/bin </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> export PATH </p> <p class="p0" style="margin-bottom: 0pt; margin-top: 0pt"> ./etc/profile </p>
返回