1.前言 基本工具
2.Podman 一个类似于docker的容器管理工具。
3.SSH 配置免密登录
1 2 3 4 5 ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.235.22 -p 7022 ssh -p '7022' 'root@192.168.235.22'
4.Docker 我尝试用阿里云的镜像进行安装。
1 2 3 4 5 6 yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum install docker-ce docker-ce-cli containerd.io
5.PHP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 yum install libxml2-devel libcurl-devel gd gd-devel libmcrypt libmcrypt-devel libtool sqlite-devel libicu-devel gcc-c++ glibc-headers libxslt-devel libjpeg-devel bzip2-devel dnf config-manager --enable crb dnf --enablerepo=crb install oniguruma-devel ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --mandir=/usr/local/php/php/man --with-config-file-path=/usr/local/php/etc --with-mhash --with-openssl --with-mysqli --with-pdo-mysql --enable-gd --with-iconv --with-zlib --disable-debug --disable-rpath --enable-shared --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-mbstring --enable-ftp --enable-pcntl --enable-sockets --enable-soap --without-pear --with-gettext --enable-session --with-curl --enable-opcache --enable-fpm --without-gdbm --disable-fileinfo --with-xsl make && make install cp php.ini-production /usr/local/php/etc/php.inicd /usr/local/php/etc/php-fpm.d/cp www.conf.default www.confcd /usr/local/php/etccp php-fpm.conf.default php-fpm.confmkdir /usr/local/php/daemoncp /home/soft/php-8.0.13/sapi/fpm/init.d.php-fpm /usr/local/php/daemon/php-fpmchmod 740 /usr/local/php/daemon/php-fpm/usr/local/php/daemon/php-fpm start ps auxfww | grep php | grep -v grep ss -lntp | grep php /usr/local/php/daemon/php-fpm stop
6.ODBC 配置 php 链接sql server 数据库,需要安装 sqlserver 的 ODBC,我这里安装了 ODBC 17。
1 2 3 4 5 6 7 8 9 10 11 curl https://packages.microsoft.com/config/rhel/9/prod.repo | sudo tee /etc/yum.repos.d/mssql-release.repo sudo yum remove unixODBC-utf16 unixODBC-utf16-devel sudo ACCEPT_EULA=Y yum install -y msodbcsql17sudo ACCEPT_EULA=Y yum install -y mssql-toolsecho 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrcsource ~/.bashrcsudo yum install -y unixODBC-devel
7.nacos (1)下载上传 (2)修改 conf/application.propires 配置 (3)修改 conf/nacos-logback.xml配置 (4)启动
8.Nginx (1)下载上传 (2)配置安装 (3)复制配置文件 (4)配置开机启动
8.Redis 1 2 3 4 5 6 7 yum install redis vi /etc/redis/redis.conf bind 0.0.0.0
9.Maven (1) 下载 上传 (2) 配置环境变量
1 2 3 4 5 6 7 vi /etc/profile export MAVEN_HOME=/usr/local/maven-3.9.9export PATH=$MAVEN_HOME /bin:$PATH source /etc/profile
10.JDK (1) 下载 上传 (2) 配置环境变量
1 2 3 4 5 6 7 8 vi /etc/profile export JAVA_HOME=/usr/local/java/jdk1.8.0_431export PATH=$JAVA_HOME /bin:$PATH export CLASSPATH=.:$JAVA_HOME /lib/dt.jar:$JAVA_HOME /lib/tools.jarsource /etc/profile
11.Tomcat (1) 下载 上传 (2) 配置环境变量
1 2 3 4 5 6 7 vi /etc/profile export TOMCAT_HOME=/usr/local/tomcat-9.0.54export CATALINA_HOME=$TOMCAT_HOME source /etc/profile
12.MySQL (1)下载 rpm仓库包,上传服务器
(2)执行安装
1 2 3 4 5 6 7 8 rpm -Uvh mysql84-community-release-el9-1.noarch.rpm yum module disable mysql yum install mysql-community-server systemctl start mysqld
(3)登录数据库并配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 grep 'temporary password' /var/log/mysqld.log mysql -u root -p ALTER USER 'root' @'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码' ; ALTER USER 'root' @'localhost' IDENTIFIED BY '123456' ; CREATE USER 'username' @'host' IDENTIFIED BY 'password' ; GRANT ALL ON *.* TO user; flush privileges;
问题 1.docker无法安装 我用的是京东的轻量云服务器,9.0的Rocky Linux,在安装的时候,增加了 docker 仓库:https://download.docker.com/linux/centos/docker-ce.repo
,总是遇到问题:docker-ce-3:27.3.1-1.el9.x86_64: Cannot download, all mirrors were already tried without success
【尝试方案】 (1)配置 docker-ce 的源
1 2 3 4 5 6 7 8 9 sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \ -i.bak \ /etc/yum.repos.d/rocky*.repo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo dnf update
(2)手动下载依赖并安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 yum install -y containerd.io-1.3.7-3.1.el7.x86_64.rpm dnf install -y docker-ce docker-ce-cli tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors" : ["https://docker.m.daocloud.io" ] } EOF sudo systemctl daemon-reloadsudo systemctl restart docker
(3)配置清华源,然后再安装
1 2 3 4 5 6 7 tee /etc/yum.repos.d/docker-ce.repo <<-'EOF' [docker-ce-stable] name=Docker-CE-Stable-$basearch baseurl=https://mirror.tuna.tsinghua.edu.cn/docker-ce/linux/centos/7/$basearch /stable enabled=1 gpgcheck=0 EOF
【解决方案】 切换到阿里云的源,然后进行安装,最后成功安装了。
2.ssh没有反应 (1) 我修改了端口之后,结果死活就是打不开这个ssh,真是烦死了。后来只能是重新安装了系统,原因就是我的 sshd 配置错误了。
(2) 后来我遇到了 ssh 总是无反应的问题。
3.远程root无法登录 1 2 3 4 5 6 7 8 9 vi /etc/ssh/sshd_config PermitRootLogin yes systemctl restart sshd
4.PostMan安装buildah问题 安装的软件包的问题 buildah-1:1.27.2-2.el9_1.x86_64,软件包 buildah-1:1.27.2-2.el9_1.x86_64 需要 runc >= 1.0.0-26,但没有提供者可以被安装。我在RockyLinux上,按照以前的安装脚本进行docker安装,结果出现了一大堆错误。
【解决方法】 卸载podman,然后再安装。
1 2 3 4 5 yum erase podman buildah yum install docker-ce docker-ce-cli containerd.io systemctl start docker systemctl enable docker
5.Deprecated Driver is detected:nft_compat will not be maintained in future major release and may be disable