使用中遇到的问题,和常用软件及工具安装的记录
更改系统语言
1、查看系当前语言包
locale
2、查看系统拥有语言包
locale -a
zh_CN.utf8
是简体中文,如果没有zh_CN.utf8
,就安装语言包
yum install kde-l10n-Chinese
3、修改/etc/locale.conf文件
vim /etc/locale.conf
默认为英文 LANG="es_US.utf8"
设置默认为中文
LANG="zh_CN.utf8"
LANGUAGE="zh_CN.utf8:zh_CN.gb2312:zh_CN"
SUPPORTED="zh_CN.utf8:zh_CN:en_US.utf8:en_US:en"
SYSFONT="lat0-sun16"
安装mariadb
1、添加MariaDB的yum源
创建MariaDB.repo
sudo vi /etc/yum.repos.d/Mariadb.repo
将以下文件中的字段添加到MariaDB.repo文件
# MariaDB 10.1 CentOS repository list - created 2016-12-01 03:36 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3.8/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
2、yum安装MariaDB
sudo yum -y install MariaDB-server MariaDB-client
3、启动MariaDB服务
systemctl start mysql.service
4、配置MariaDB服务
mysql_secure_installation
具体设置
#由于一开始安装MariaDB数据库后, root用户默认密码为空, 所以只需要按Enter键
Enter current password for root (enter for none):
#是否设置root用户的新密码
Set root password? [Y/n] y
#录入新密码
New password:
#确认新密码
Re-enter new password:
#是否删除匿名用户,生产环境建议删除
Remove anonymous users? [Y/n] y
#是否禁止root远程登录,根据自己的需求选择
Disallow root login remotely? [Y/n] n
#是否删除test数据库
Remove test database and access to it? [Y/n] y
#是否重新加载权限表
Reload privilege tables now? [Y/n] y
5、开启远程访问
防火墙添加3306端口
#查看firewall状态
firewall-cmd --state
#状态是not running,启动firewall
systemctl start firewalld
#状态是running,开放3306端口
firewall-cmd --zone=public --add-port=3306/tcp --permanen
#重新载入
firewall-cmd --reload
Navicat连接报navicat for mysql 1130 (HY000): Host 'xxx.xxx.xxx.xxx ' is not allowed to connect to this mariadb server
错误
#这个没有设置权限的问题。 你需要在mariadb本地,给予权限,要root或者管理员权限才行。
#比如允许root用户,通过任何host访问,并设置密码为 root
#grant all privileges on *.* to root@'%' identified by 'root';
#grant all privileges on [dbname].* to [username]@[IP] identified by ‘password′;
#进入Mariadb
mysql -uroot -p
#选择数据库
use mysql;
#添加权限
Grant all on *.* to 'root'@'%' identified by '密码' with grant option;
#重新载入
flush privileges;
安装Tengine
1.安装依赖
yum -y install gcc gcc-c++ autoconf automake make
yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
yum -y install openssl openssl-devel
2.下载
http://tengine.taobao.org/download_cn.html
3.编译和安装
$ ./configure
$ make
$ sudo make install
#Tengine默认将安装在/usr/local/nginx目录
安装JDK
1.在/usr/local目录下创建java文件夹
mkdir /usr/local/java
2.安装JDK
去官网下载Linux版本的JDK,上传到 /usr/local/java
目录然后解压缩 tar -zxvf 文件名
3.配置环境变量
1.编辑配置文件
vim /etc/profile
2.在文件尾部添加如下配置
export JAVA_HOME=/usr/local/java/JDK文件夹名称
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

3.重新加载配置文件
source /etc/profile
4.测试
通过 java -version
命令测试是否安装成功

网友评论