Centos8安装mysql5.7

From:https://www.jianshu.com/p/65527f186bd7

1、首先得切换到root账户:

su -

2、下载并安装MySQL官方的 Yum Repository

[root@localhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

使用上面的命令就直接下载了安装用的Yum Repository,大概25KB的样子,然后就可以直接yum安装了。

[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm

3、安装MySQL服务器

[root@localhost ~]# yum -y install mysql-community-server

此处碰到报错:All matches were filtered out by modular filtering for argument: mysql-community-server
解决方法:先执行 yum module disable mysql 再执行 yum install mysql-community-server

4、mysql数据库设置

4.1 启动数据库:[root@localhost ~]# systemctl start mysqld.service
4.2 查看MySQL运行状态:[root@localhost ~]# systemctl status mysqld.service
4.3 此时MySQL已经开始正常运行,不过要想进入MySQL还得先找出此时root用户的密码,通过如下命令可以在日志文件中找出密码:[root@localhost ~]# grep "password" /var/log/mysqld.log

root密码
4.4 进入数据库:[root@localhost ~]# mysql -uroot -p
输入初始密码(上面图片绿框中),此时不能做任何事情,因为MySQL默认必须修改密码之后才能操作数据库:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
其中‘new password’替换成你要设置的密码,注意:密码设置必须要大小写字母数字和特殊符号(,/’;:等),不然不能配置成功

5、开启mysql的远程访问

执行以下命令开启远程访问限制(注意:下面命令开启的IP是 192.168.0.1,如要开启所有的,用%代替IP):

mysql> grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'password' with grant option;

刷新权限:mysql> flush privileges;
退出数据库:mysql> exit

6、为firewalld添加开放端口

添加mysql端口3306和Tomcat端口8080

[root@localhost ~]# firewall-cmd --zone=public --add-port=3306/tcp --permanent

[root@localhost ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent

然后再重新载入

[root@localhost ~]# firewall-cmd --reload

7、更改mysql编码方式

首先重新登录mysql,然后输入status:

Server characterset: latin1
Db characterset: latin1

可以看到,红框处不是utf-8
因此我们先退出mysql,然后再到、etc目录下的my.cnf文件下修改一下文件内容:

vi /etc/my.cnf

image.png
进入文件后,按 I 键进行编辑,新增下图四行代码:

[client]
default-character-set=utf8

[mysqld]

character-set-server=utf8
collation-server=utf8_general_ci


新增完,先按Esc键,然后按Shift + 键,输入wq,按Enter键
Tips:新增的代码中一个空格也不要有

8、在Windows下的CMD命令行启动mysql:

mysql -h 192.168.0.124 -P 3306 -u root -p

centos 8 install php 8


From: https://www.jianshu.com/p/04e8ad506ad7

更新软件到最新

yum update

下载php源码并解压

wget https://www.php.net/distributions/php-8.0.0.tar.gz

tar-xvzf php-8.0.0.tar.gz

cd php-8.0.0

安装gcc软件

yum install gcc gcc-c++ make

安装php依赖软件

yum install libxml2 libxml2-devel openssl openssl-devel freetype freetype-devel libzip libzip-devel sqlite sqlite-devel gd gd-devel libcurl-devel libicu libicu-devel libxslt libxslt-devel

安装oniguruma软件

yum install https://rpms.remirepo.net/enterprise/8/remi/x86_64/oniguruma5php-6.9.8-1.el8.remi.x86_64.rpm

yum install https://rpms.remirepo.net/enterprise/8/remi/x86_64/oniguruma5php-devel-6.9.8-1.el8.remi.x86_64.rpm

配置编译

./configure –prefix=/usr/local/php –with-zlib-dir –enable-mbstring –enable-soap –enable-calendar –with-curl –disable-rpath –enable-gd –enable-gd-jis-conv –with-bz2 –with-zlib –enable-sockets –enable-sysvsem –enable-sysvshm –enable-pcntl –enable-mbregex –enable-exif –enable-bcmath –with-mhash –with-pdo-mysql –with-mysqli –with-openssl –with-fpm-user=www –with-fpm-group=www –with-libdir=/lib/x86_64-linux-gnu/ –enable-ftp –with-gettext –with-xsl –enable-opcache –enable-fpm –with-iconv –with-zip –with-pear –with-freetype –enable-intl

开始编译

make -j4 #指定同时运行的作业数量,让尽可能多的作业同时运行。如果有一个以上的“-j”选项,最后一个选项是有效的。

安装php

make install

添加php.ini配置文件

cp php.ini-production /usr/local/php/lib/php.ini

以下操作为配置php

添加用户

useradd www

修改php-fpm.conf

cd /usr/local/php/etc

cp php-fpm.conf.default php-fpm.conf

cd php-fpm.d

cp www.conf.default www.conf

编辑www.conf文件,根据自己的服务器配置修改以下配置

pm.max_children=10

pm.start_servers=5

pm.min_spare_servers=4

pm.max_spare_servers=7

移除前面的注释;

;env[HOSTNAME] = $HOSTNAME

;env[PATH] = /usr/local/bin:/usr/bin:/bin

;env[TMP] = /tmp

;env[TMPDIR] = /tmp

;env[TEMP] = /tmp

修改php配置文件

cd /usr/local/php/lib

vim php.ini

修改内存限制

memory_limit=512M

修改上传文件限制

post_max_size=512M

upload_max_filesize=512M

启用OPcache 和 JIT; OPcache [1] 通过将 PHP 脚本预编译的字节码存储到共享内存中来提升 PHP 的性能, 存储预编译字节码的好处就是 省去了每次加载和解析 PHP 脚本的开销。

移除注释

;zend_extension=opcache

[opcache]

opcache.enable=1

opcache.memory_consumption=128

;opcache.interned_strings_buffer=8

;opcache.max_accelerated_files=10000

;opcache.validate_timestamps=1

在[opcache]添加jit支持

opcache.jit_buffer_size=128M

注意:虚拟机里可能启动时报错。

设置php-fpm开机启动

vim /usr/lib/systemd/system/php-fpm.service

其内容为

[Unit]

Description=The PHP FastCGI Process ManagerAfter=network.target

[Service]

Type=simple

PIDFile=/usr/local/php/var/run/php-fpm.pid

ExecStart=/usr/local/php/sbin/php-fpm –nodaemonize –fpm-config /usr/local/php/etc/php-fpm.conf

ExecReload=/bin/kill -USR2 $MAINPID

PrivateTmp=true

[Install]

WantedBy=multi-user.target

保存退出后执行

systemctl enable php-fpm

systemctl start php-fpm

查看运行状态

systemctl status php-fpm

Linux命令行

ln -s /usr/local/php/bin/php /usr/bin/php

安装libphp.so

sudo yum install http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/php-common-8.0.20-1.module_el8.7.0+1191+c110972c.x86_64.rpm

sudo yum install http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/php-embedded-8.0.20-1.module_el8.7.0+1191+c110972c.x86_64.rpm

接着安装和配置httpd

http://yufeng.group/install-httpd/

Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirror

处理办法:

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

#-O, –output-document=FILE 将文档写入 FILE。

#-o, –output-file=FILE 将日志信息写入 FILE。

yum makecache

sudo sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*

sudo sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g’ /etc/yum.repos.d/CentOS-*

域名常用的邮件内容

邮件标题:

1、

{{first_name:Hello}}, OKRCloud.com for Your Business

{{first_name:Hello}}, OKRCloud产品赋能

2、

Reminder: {{first_name:Hello}}, OKRCloud.com for Your Online Success.

Reminder: {{first_name:Hello}}, OKRCloud.com助力商业成功

3、

Re: {{first_name:Hello}}, OKRCloud.com As a Corporate Domain Name

Re: {{first_name:Hello}}, OKRCloud.com企业域名

4、

Reminder: {{first_name:Hello}}, the first address for your online success

Reminder: {{first_name:Hello}}, 产品名字重要吗

5、

Reminder: {{first_name:Hello}}, opportunity knock but once

Reminder: {{first_name:Hello}}, OKRCloud机会只有一次

Domain name knowledge

from:https://en.shopify.hk/tools/domain-name-generator?term=best%20domain%20name&adid=566140654721&campaignid=15433368939&gclid=EAIaIQobChMIyIn04KnH-AIVZNOWCh0c8w8NEAAYAiAAEgJkRPD_BwE&cmadid=516585705;cmadvertiserid=10730501;cmcampaignid=26990768;cmplacementid=324494758;cmcreativeid=163722649;cmsiteid=5500011

What is a domain name?


A domain name is a public website address, and it’s what you type in a browser’s URL search bar to locate any website on the internet.

Domain names are actually the user-friendly version of what’s going on behind the scenes when a user makes a domain name search online. For identity purposes, every computer using the internet has an assigned IP address. Each computer on this network can communicate with other computers. An IP address is a series of unique numbers that would be very challenging to memorize. Instead of having to commit thousands of numerical codes to memory to search for websites, we use domain names. They allow us to create unique digital addresses that can be easily typed and searched.

What should I consider when deciding on a domain name?

When deciding on a domain name, here’s a few questions to ask yourself:

  • – Will your business operate out of its home country primarily? If so, a regional domain name extension (like a .ca or .uk) might be a great choice.
  • What domain names are your direct competitors using? You want to make sure that your brand or business stands out from the competition, especially in smaller regional markets.
  • – If you’re choosing a regional domain, is the .com also available? If so, it might be a good strategy to buy your name in several popular domain extensions to safeguard your brand for the future.
  • – Are the social media handles that match your domain name available too? Ideally, you want your domain names and social media usernames to be an exact match. This helps quickly build brand identity and helps your customers or community find you easier.

How do I know if a domain name is good?

The best domain names are simple, catchy and easy to spell. This means avoiding hyphens and numbers, that can be more difficult to remember or prone to typos. A good domain name should be aligned with the brand or business you want to create and it should give visitors a hint about what they can expect when they land on your website.

What are good alternatives to a .com domain name?

Regional domain extensions can make for great alternatives to a .com domain if a business or an individual plans to mainly operate and market services within their home country. In most cases, regional extensions have more domain name availability so it’s easier to secure desired domain names.

There are also several other popular top level domain extensions which can be great options too. Other popular top level domains include .org, .info, .net, .biz and .online.

There are some new top level domains that are rising in popularity as well, including .shop, .xyz, .vip, .fit, .blog, .co, .website and .store.

英文名字解析

发现了一个不错的网站https://nameecho.com,它解析英文名的好与坏,会分析到每个字母的含义,同时会在各方面打分。

比如edrong

EE’s are original people who use their imagination in various ways, in order to pursue their high dreams.
D‘D’ is associated with all the dreams that one is striving to bring to reality.
RWithin the ‘R’ it can be unearthed a joyous and empathetic nature, testimony of someone with a largely emotional response as opposed to a realistic and fact based reaction, on most occasions.
OAs the ‘O’ is believed to be resonating with the number 6, this is someone who is very responsible and loyal, interested in being of service to the world.
NAssuming the best in everyone is just one standard golden rule that is of uppermost importance for ‘N’.
GWhen ‘G’ is out of proportion, a sense of self-doubt will creep in regardless of how well these people might be doing otherwise.

Life Lesson & Challenge: As the first vowel of their name is ‘E’, people named Edrong are given the particular life lesson of recognizing that material possessions don’t really bring much happiness, whilst the life challenge calls attention to anticipating the needs and wants of people from their entourage.

Spirituality Charge: Very High

新的感觉

昨晚终于忍不住,在小宝宝房间睡着了,11点入睡,一直睡到5:30,估计这是2年内睡得最舒服的一次。

5:30自动醒来,伸了个懒腰,准备继续睡的时候,脑袋里忽然响起一个声音:在你睡醒伸懒腰的时候,其实你已经在思考人生了。忽然间有些明亮,然后起床了。很奇怪,人生真的很奇妙。也有些好奇,出现这一句的时候是以一个老外的形象表现的,可能是最近泡外文比较多的缘故吧。

早起后头脑相对2点睡7点起来,舒服多了,我觉得要自律一下了,身体吃不消,胃不舒服。说起自律难,希望能做到。

bpvr

bpvr.com domain name for sale.

easyapi27.com, .de, .net, .org, .ru, .cn, .nl, .eu, .tk, .co, .online, .top, .in, .se, .site, .com.cn, .io, .ir, .app, .tech, .dev, .com.tr, .cloud, .chat, .vin, .build, .builders
areasyapi1.com
easyapi881.com
easyapiary1.com
easyapiculture2.com, .net
easyapidesign1.com
easyapidoc1.com
easyapidocs1.com
easyapie1.com
easyapify1.com
easyapiinsaat1.com
easyapimock1.com
easyapip1.com
easyapipayments1.com
easyapirit1.com
easyapis2.com, .org
easyapiservices1.com
easyapisolutions1.com
egeasyapi1.com
geteasyapi1.com
measyapi1.com
myeasyapi1.com
neteasyapi1.xyz
overseasyapi1.com
peasyapi1.com
speakeasyapi1.dev
streameasyapi1.one
streeteasyapi1.com
supereasyapi1.com
theeasyapi1.com