一、MySQL的配置
1.安装MariaDb和其客户端工具
sudo pacman -S mariadb mariadb-clients
2.安装完成之后,会出现如何开启MariaDb的提示:
:: You need to initialize the MariaDB data directory prior to starting
the service. This can be done with mysql_install_db command, e.g.:
mysql_install_db –user=mysql –basedir=/usr –datadir=/var/lib/mysql
根据提示,初始化数据库目录
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
3.接下来会出现MariaDb的帮助信息
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h mypc password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at sales@mariadb.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
4.启动MariaDb,
sudo systemctl start mysqld
5.为root用户设置一个密码,
mysqladmin -u root password 'root'
6.登录MariaDb,如果登录成功,说明配置完成了,
mysql -uroot -p
7.MariaDb开机自动启动
sudo systemctl enable mysqld
8.图形化MySQL工具navicat
i.官方试用版安装
中文版:http://www.navicat.com.cn/download/navicat-for-mysql
或英文版:https://www.navicat.com/en/download/navicat-for-mysql
免费试用14天。
ii.解压
tar -zxvf /usr/local/navicat120_mysql_cs_x64.tar.gz
iii.运行
./start_navicat
之后会提示安装wine(wine是Windows应用在Linux下运行的必须的环境)
官方下载的navicat已经继承好了wine在压缩包里,所以使用官方下载的更为省心
iv.启动
安装好wine后,运行navicat,会弹出对话框,可选择使用或输入注册码注册。不要去找注册码,选“试用”,除非你有可用的注册码。
v.解决navicat的中文乱码问题
vim start_navicat
export LANG="zh_CN.UTF-8" //第八行中export LANG="en_US.UTF-8
vi.破解
其实没有什么好的破解方法,有的是把Linux下的exe应用拷贝到Windows中再从Windows中进行破解。
还有一个办法就是删除/opt/目录下的/.navicat目录,或者system.reg这个文件(因为这个文件是记录navaicat运行的时间的)
二、maven
1.安装maven
http://maven.apache.org/download.cgi
2.解压文件
tar -zxvf apache-maven-3.6.1-bin.tar.gz
sudo mv -f apache-maven-3.6.1 /usr/local/
3.添加环境变量
vim /etc/profile
在文末添加以下代码
export MAVEN_HOME=/usr/local/apache-maven-3.6.1
export PATH=${PATH}:${MAVEN_HOME}/bin
使更改生效
source /etc/profile
检查是否安装成功
mvn -v
若有输出信息则安装成功
网友评论