In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "what to pay attention to when installing docker and laradoc". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what to pay attention to when installing docker and laradoc"!
Install the latest docker-compose
Log of 1centos7.0 installation
111sudo yum install-y yum-utils device-mapper-persistent-data lvm2
798 yum-config-manager-add-repo https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo
799 docker-compose-version
802 yum remove docker-compose
803 sudo curl-L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname-s)-$(uname-m)"-o / usr/local/bin/docker-compose
804 chmod + x / usr/local/bin/docker-compose
805 docker-compose-version
807 chmod + x / usr/local/bin/docker-compose
810 which docker-compose
811 / usr/local/bin/docker-compose
815 rm / usr/bin/docker-compose-rf
817 ln-s / usr/local/bin/docker-compose / usr/bin/docker-compose
818 docker-compose
819 docker-compose up caddy postgres
823 ps-ef | grep 80
# # the following is the original installation of bt, which can be ignored
824 / etc/init.d/bt stop
825 / etc/init.d/nginx stop
826 / etc/init.d/php-fpm-56 stop
# # starting from here
827 docker-compose up caddy postgres
2. Before entering the workspace, please make sure that the environment has been started
Docker-compose exec workspace bash [reported permission error], added parameter-- user=laradock
Docker-compose exec-user=laradock workspace bash
Will enter the / var/www directory
You can execute the composer and PHP commands at this point.
You can also execute the corresponding command if node and yarn are enabled by env-example.
3. Install notadd (never installed successfully)
(note: many documents say that the download is git clone https://github.com/notadd/notadd.git, but the public file cannot be found. Later, when I saw https://gitee.com/stamhe/notadd/, I downloaded it from here)
$cd notadd $composer install $php notadd vendor:publish-- force
-
Composer Content-Length mismatch pit
-
[root@localhost docker] # docker-compose exec-- user=laradock workspace bash
Laradock@f38202628d46:/var/www$ composer install
Composer could not find a composer.json file in / var/www
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Laradock@f38202628d46:/var/www$ cd notadd
Laradock@f38202628d46:/var/www/notadd$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
.... It's a long time, about five minutes.
The following error occurred in composer update:
[Composer\ Downloader\ TransportException] Content-Length mismatch
Resolve:
Replace the source:
Composer config repo.packagist composer https://packagist.phpcomposer.com (broken)
Composer config-g repo.packagist composer https://mirrors.aliyun.com/composer
If the source is changed, it still fails. It means it's the speed of the Internet.
[root@localhost docker] # docker-compose images
ERROR: Couldn't connect to Docker daemon at http+docker://localhost-is it running?
.
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
[root@localhost docker] # systemctl start docker.service
[root@localhost docker] # docker-compose images
Pit treatment of docker mysql
[root@localhost docker] # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
749b4031b2da e12a2860ec4a "/ bin/sh-c'if [${…" 13 minutes ago Up 13 minutes frosty_roentgen
78dd491ef5c1 laradock_mysql "docker-entrypoint.s..." 33 minutes ago Up 11 minutes 0.0.0.0 3306/tcp 3306-> 33060/tcp laradock_mysql_1_b66ee05935fb
[root@localhost docker] #
[root@localhost docker] # docker exec-it 78dd491ef5c1 bash
Root@78dd491ef5c1:/#
Root@78dd491ef5c1:/# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Root@78dd491ef5c1:/# mysql-uroot-proot
Mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 9
Server version: 8.0.18 MySQL Community Server-GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql > exit
This uses the windows client tool mysql Sqlyog connection to report a 1251 error. For treatment, see: https://blog.csdn.net/qq_36068954/article/details/80175755
[root@localhost docker] # docker exec-it 78dd491ef5c1 bash
Root@78dd491ef5c1:/# mysql-uroot-p
Mysql > use mysql
Mysql > ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' password'
Query OK, 0 rows affected (0.01 sec)
Mysql > ALTER USER 'root'@'%' IDENTIFIED BY' root' PASSWORD EXPIRE NEVER
Query OK, 0 rows affected (0.00 sec)
Mysql > FLUSH PRIVILEGES
Query OK, 0 rows affected (0.00 sec)
Modification completed, use sqlyog to test ip:192.168.137.103 root ps:root port: 3306, passed successfully.
-
Using php artisan make:auth in laravel indicates that it is not defined. This may be using the wrong version of git clone installation. Back through the Laravel installer
-
# docker-compose exec-user=laradock workspace bash
Laradock@86eb8724d279:/var/www/laravel$ composer config-g repo.packagist composer https://mirrors.aliyun.com/composer
Laradock@86eb8724d279:/var/www/laravel$ composer update
Loading composer repositories with package information
-
First, install the Laravel installer by using Composer:
Composer global require laravel/installer
-
Chinese documentation for installing laravel5.8: https://learnku.com/docs/laravel/5.8/installation/3879
Choose to create a project through Composer (this is fine)
Run the create-project command in the terminal to install Laravel:
Composer create-project-prefer-dist laravel/laravel blog "5.8.*"
3. Create a laravel project using composer, http://silsuer.cn/2018/01/17/laravel-docker-env-windows/
-
Use composer to report continuously in the virtual machine of the local computer.
[Composer\ Downloader\ TransportException] error. It took a whole day to adjust the composer. It is estimated that the local network is too slow.
-
From the environment where the installed local computer can use php artisan make:auth, the local computer laravel directory is packaged as zip and put into the virtual machine.
Use
# docker-compose exec-user=laradock workspace bash
Laradock@86eb8724d279:/var/www/laravel$ php artisan make:auth
The [auth/login.blade.php] view already exists. Do you want to replace it? (yes/no) [no]:
> n
Because of the original document, the above indicates that it is a success.
Reference:
Https://gitee.com/stamhe/notadd/
Https://learnku.com/articles/15197/laradock-portal-configuration
At this point, I believe you have a deeper understanding of "what to pay attention to when installing docker and laradoc". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.