加密码提示输入密串,需要输入两次
[root@kiccleaf ~]# tar -czvf - kiccleaf | openssl des3 -salt -out kiccleaf.tar.gz
test.sh
enter des-ede3-cbc encryption password:
Verifying - enter des-ede3-cbc encryption password:
直接解压不可以咯
[root@kiccleaf ~]# tar zxvf kiccleaf.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
解压提示输入密串
[root@kiccleaf ~]# openssl des3 -d -salt -in kiccleaf.tar.gz | tar zxvf -
enter des-ede3-cbc decryption password:
test.sh
root@kiccleaf:/home # service php-fpm restart
root@kiccleaf:/home # service nginx restart
启动Mysql,正常情况下
root@kiccleaf:/usr/local/etc # service mysql-server start
Installing MariaDB/MySQL system tables in '/var/db/mysql' ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system 'mysql' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo
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/local' ; /usr/local/bin/mysqld_safe --datadir='/var/db/mysql'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/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
Consider joining MariaDB's strong and vibrant community:
2020-08-29 22:52:52 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-08-29 22:52:52 0 [Note] InnoDB: Uses event mutexes
2020-08-29 22:52:52 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-29 22:52:52 0 [Note] InnoDB: Number of pools: 1
2020-08-29 22:52:52 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-08-29 22:52:52 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-08-29 22:52:52 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-29 22:52:52 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-08-29 22:52:52 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-29 22:52:52 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-29 22:52:52 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-08-29 22:52:52 0 [Note] InnoDB: Waiting for purge to start
2020-08-29 22:52:52 0 [Note] InnoDB: 10.4.13 started; log sequence number 61026; transaction id 21
2020-08-29 22:52:52 0 [Note] InnoDB: Loading buffer pool(s) from /var/db/mysql/ib_buffer_pool
2020-08-29 22:52:52 0 [Note] InnoDB: Buffer pool(s) load completed at 200829 22:52:52
2020-08-29 22:52:52 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-29 22:52:52 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-08-29 22:52:52 0 [ERROR] Can't start server : Bind on unix socket: Permission denied
2020-08-29 22:52:52 0 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysql/mysql.sock ?
2020-08-29 22:52:52 0 [ERROR] Aborting
关键的错误信息已经提示:Can’t start server : Bind on unix socket: Permission denied 和Do you already have another mysqld server running on socket: /var/run/mysql/mysql.sock ?启动权限有关,需要找到启动:/var/run/mysql目录 权限:root wheel需要修改成mysql用户权限,然后重启mysql就成功了。
原目录权限
drwxr-xr-x 2 root wheel 512 Aug 29 22:09 mysql/
变更目录所有者权限
root@kiccleaf:/var/run # chown -R mysql:mysql mysql/
运行mysql
root@kiccleaf:/var/run # service mysql-server start
Starting mysql.
查看一下mysql目录下是否生成了mysql.sock文件
root@kiccleaf:/var/run # ll mysql/
total 0
srwxrwxrwx 1 mysql mysql 0 Aug 29 23:03 mysql.sock=
查看进程是否已经启动,找到mysqld_safe
root@kiccleaf:/var/run # ps aux
mysql 1092 0.0 0.0 11988 2976 - Ss 23:03 0:00.99 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/usr/local/etc/my.cnf --user=mysql
接下去初始mysql操作
root@kiccleaf:/var/run # /usr/local/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
#输入mysql的root密码。默认没有,直接回车
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
#是否切换到unix套接字身份验证[Y/n]
Switch to unix_socket authentication [Y/n] n
... skipping.
You already have your root account protected, so you can safely answer 'n'.
#是否设置root密码,选Y,输入2次需要设定的密码
Change the root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
#是否删除匿名用户?果断删除
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
#是否不允许远程root登录,正式环境下应该选择Y,我是在测试环境需要连接。
Disallow root login remotely? [Y/n] n
... skipping.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
#是否删除test数据库
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
#是否加载权限使之生效
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
root@kiccleaf:~ # nginx -v
nginx version: nginx/1.12.0
root@kiccleaf:~ # pkg upgrade nginx
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 95.5kB/s 01:11
Processing entries: 100%
FreeBSD repository update completed. 33333 packages processed.
The following 2 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
nginx: 1.12.0_1,2 -> 1.14.0_13,2
pcre: 8.40_1 -> 8.42
The process will require 178 KiB more space.
2 MiB to be downloaded.
Proceed with this action? [y/N]: y
Fetching nginx-1.14.0_13,2.txz: 100% 416 KiB 425.5kB/s 00:01
Fetching pcre-8.42.txz: 100% 1 MiB 1.2MB/s 00:01
Checking integrity... done (0 conflicting)
[1/2] Upgrading pcre from 8.40_1 to 8.42...
[1/2] Extracting pcre-8.42: 100%
[2/2] Upgrading nginx from 1.12.0_1,2 to 1.14.0_13,2...
You may need to manually remove /usr/local/etc/nginx/nginx.conf if it is no longer needed.
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
[2/2] Extracting nginx-1.14.0_13,2: 100%
Message from nginx-1.14.0_13,2:
===================================================================
Recent version of the NGINX introduces dynamic modules support. In
FreeBSD ports tree this feature was enabled by default with the DSO
knob. Several vendor's and third-party modules have been converted
to dynamic modules. Unset the DSO knob builds an NGINX without
dynamic modules support.
To load a module at runtime, include the new `load_module'
directive in the main context, specifying the path to the shared
object file for the module, enclosed in quotation marks. When you
reload the configuration or restart NGINX, the module is loaded in.
It is possible to specify a path relative to the source directory,
or a full path, please see
https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
http://nginx.org/en/docs/ngx_core_module.html#load_module for
details.
Default path for the NGINX dynamic modules is
/usr/local/libexec/nginx.
===================================================================
root@kiccleaf:~ # nginx -v
nginx version: nginx/1.14.0
使用到的命令
pkg update 更新下软件库的信息,这样可以知道软件库中个套件的最新版本。
pkg upgrade 是升级你安装的套件
pkg info 显示软件包信息
第一步升级PHP版本
root@kiccleaf:~ # php -v #查看升级前PHP版本
PHP 7.1.4 (cli) (built: Nov 25 2017 01:17:11) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies
root@kiccleaf:~ # pkg upgrade php71
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 2 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
php71: 7.1.4 -> 7.1.12
pcre: 8.37_4 -> 8.40_1
The process will require 84 KiB more space.
3 MiB to be downloaded.
Proceed with this action? [y/N]: y #同意更新
Fetching php71-7.1.12.txz: 100% 2 MiB 103.2kB/s 00:21
Fetching pcre-8.40_1.txz: 100% 1 MiB 165.7kB/s 00:07
Checking integrity... done (0 conflicting)
[1/2] Upgrading pcre from 8.37_4 to 8.40_1...
[1/2] Extracting pcre-8.40_1: 100%
[2/2] Upgrading php71 from 7.1.4 to 7.1.12...
You may need to manually remove /usr/local/etc/php-fpm.d/www.conf if it is no longer needed.
[2/2] Extracting php71-7.1.12: 100%
root@kiccleaf:~ # php -v #查看升级后版本
PHP 7.1.12 (cli) (built: Nov 25 2017 01:17:11) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies